import { Get, Post, request } from "./request";

export const Ajax = {
  testApi (data: any) { Get("/api/test", data) }, //对象的简化写法
  // testApi: (data: any) => Get("/api/test", data),

  register: (data: any) => Post("/api/register", data),

  login: (data: any) => Post("/api/login", data),

  getuserinfo: (data: any) => Post("/api/getuserinfo", data),

  getcaptcha: (data: any) => Get("/api/getcaptcha", data),

  checkcaptcha: (data: any) => Post("/api/checkcaptcha", data),
  //修改密码
  changepass: (data: any) => Post("/api/changepass", data),
  // 另一个修改密码
  changepasst: (data: any) => Post("/api/changepasst", data),
  //找回密码
  findpass: (data: any) => Post("/api/findpass", data),
  // 上传文件
  uploadfile: (data: any) => Post("/api/uploadfile", data),
  // 修改个人信息
  changeuser: (data: any) => Post("/api/changeuser", data),
  // 新增留言
  annoadd: (data: any) => Post("/api/annoadd", data),
  // 查询留言
  annolist: (data: any) => Post("/api/annolist", data),
  // 修改留言
  annoupdate: (data: any) => Post("/api/annoupdate", data),
  // 删除留言
  annodelete: (data: any) => Post("/api/annodelete", data),

  // 新增意见
  adviseadd: (data: any) => Post("/api/adviseadd", data),
  // 查询意见
  adviselist: (data: any) => Post("/api/adviselist", data),
  // 修改意见
  adviseupdate: (data: any) => Post("/api/adviseupdate", data),
  // 删除意见
  advisedelete: (data: any) => Post("/api/advisedelete", data),

  // 新增核酸状态
  nucadd: (data: any) => Post("/api/nucadd", data),
  // 查询核酸
  nuclist: (data: any) => Post("/api/nuclist", data),
  // 删除核酸
  nucdelete: (data: any) => Post("/api/nucdelete", data),

  // 新增疫苗状态
  vacadd: (data: any) => Post("/api/vacadd", data),
  // 查询疫苗
  vaclist: (data: any) => Post("/api/vaclist", data),
  // 删除疫苗
  vacdelete: (data: any) => Post("/api/vacdelete", data),

  // 新增出行状态
  traadd: (data: any) => Post("/api/traadd", data),
  // 查询出行
  tralist: (data: any) => Post("/api/tralist", data),
  // 删除出行
  tradelete: (data: any) => Post("/api/tradelete", data),
  // 查询商品列表，没有增加、删除、修改，只做查询
  goodslist: (data: any) => Post("/api/goodslist", data),
  // 添加到购物车。通过手机
  cartadd: (data: any) => Post("/api/cartadd", data),
  // 查询购物车，通过用户手机查询，只能看到自己的
  cartlist: (data: any) => Post("/api/cartlist", data),
  // 更改购物车，更改商品件数和checked属性
  cartupdate: (data: any) => Post("/api/cartupdate", data),
  // 删除购物车
  cartdelete: (data: any) => Post("/api/cartdelete", data),
  // 添加订单
  billadd: (data: any) => Post("/api/billadd", data),
  // 查询订单
  billlist: (data: any) => Post("/api/billlist", data),
  // 删除订单
  billdelete: (data: any) => Post("/api/billdelete", data),
  // 修改订单
  billupdate: (data: any) => Post("/api/billupdate", data),
  //用户 //新增
  useradd: (data: any) => Post("/api/useradd", data),
  // 查询
  userlist: (data: any) => Post("/api/userlist", data),
  // 删除
  userdelete: (data: any) => Post("/api/userdelete", data),
  // 修改
  userupdate: (data: any) => Post("/api/userupdate", data),
  // 获得各个角色的名称、颜色等信息
  getrolelist: (data: any) => Post("/api/getrolelist", data),
  // 新增角色
  roleadd: (data: any) => Post("/api/roleadd", data),
  // 修改角色
  roleupdate: (data: any) => Post("/api/roleupdate", data),
  // 删除角色
  roledelete: (data: any) => Post("/api/roledelete", data),
};
